<?php
/**
 * Description of UtenteManager
 *
 * @author rocco
 */

require_once  '../classes/ClasseDataManager.php';
class ClasseManager
{
    private static $instance;

    public static function getInstance()
    {
        if(self::$instance == null)
        {
            $c = __CLASS__;
            self::$instance = new $c;
        }
        return self::$instance;
    }
    public function insertClasse($connection, $classe, $sezione, $indirizzo)
    {
        ClasseDataManager::getInstance()->insertClasse($connection, $classe, $sezione, $indirizzo);
    }

    public function getClassi($connection)
    {
        return ClasseDataManager::getInstance()->getClassi($connection);
    }

    public function getClassiByUser($db, $userLoggato)
    {
        return ClasseDataManager::getInstance()->getClassiByUser($db, $userLoggato);
    }

    public function getStudentiByClasse($connection, $codiceClasse)
    {
        return ClasseDataManager::getInstance()->getStudentiByClasse($connection, $codiceClasse);
    }

    public function existClass($db, $classe, $sezione, $indirizzo)
    {
        return ClasseDataManager::getInstance()->existClass($db, $classe, $sezione, $indirizzo);
    }
}
?>


